registry = set()


def register(active=True):
    def decorate(func):
        print('running register(active=%s)->decorate(%s)'%(active, func))
        if active:
            registry.add(func)
        else:
            registry.discard(func)
        return func
    return decorate


